using System.ComponentModel.DataAnnotations;

namespace ERP.ProductionManage.Dtos
{
    /// <summary>
    /// 创建生产退料明细 DTO
    /// </summary>
    public class CreateProductionReturnDetailDto
    {
        /// <summary>
        /// 生产退料ID
        /// </summary>
        [Required(ErrorMessage = "生产退料ID不能为空")]
        public int ProductionReturnId { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        [Required(ErrorMessage = "物料编码不能为空")]
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        [Required(ErrorMessage = "物料名称不能为空")]
        public string MaterialName { get; set; }

        /// <summary>
        /// 规格尺寸
        /// </summary>
        public string Size { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [Required(ErrorMessage = "单位不能为空")]
        public string Unit { get; set; }

        /// <summary>
        /// 退料数量
        /// </summary>
        [Required(ErrorMessage = "退料数量不能为空")]
        [Range(1, int.MaxValue, ErrorMessage = "退料数量必须大于0")]
        public int Num { get; set; }

        /// <summary>
        /// 批次
        /// </summary>
        public string Batch { get; set; }

        /// <summary>
        /// 仓库ID
        /// </summary>
        [Required(ErrorMessage = "仓库ID不能为空")]
        public int WarehouseId { get; set; }

        /// <summary>
        /// 仓库名称
        /// </summary>
        [Required(ErrorMessage = "仓库名称不能为空")]
        public string WarehouseName { get; set; }
    }
} 